﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DevExpress.Utils.Extensions;
using DevExpress.XtraSplashScreen;

namespace EyFramework.Library.Control
{
    public class OverlayTextPainterEx : OverlayTextPainter
    {
        protected override Rectangle CalcTextBounds(OverlayLayeredWindowObjectInfoArgs drawArgs)
        {
            Size textSz = CalcTextSize(drawArgs);
            return textSz.AlignWith(drawArgs.Bounds).WithX(drawArgs.ImageBounds.Left - (this.Text.Length * 5)).WithY(drawArgs.ImageBounds.Top - textSz.Height - 30);
        }
    }
}